package com.ruoyi.system.service.impl;

import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DashboardMapper;
import com.ruoyi.system.service.IDashboardService;

/**
 * 首页数据统计Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-01
 */
@Service
public class DashboardServiceImpl implements IDashboardService 
{
    @Autowired
    private DashboardMapper dashboardMapper;

    /**
     * 获取用户总数
     */
    @Override
    public Long getTotalUsers()
    {
        return dashboardMapper.getTotalUsers();
    }

    /**
     * 获取视频总数
     */
    @Override
    public Long getTotalVideos()
    {
        return dashboardMapper.getTotalVideos();
    }

    /**
     * 获取评论总数
     */
    @Override
    public Long getTotalComments()
    {
        return dashboardMapper.getTotalComments();
    }

    /**
     * 获取点赞总数
     */
    @Override
    public Long getTotalLikes()
    {
        return dashboardMapper.getTotalLikes();
    }

    /**
     * 获取今日新增用户数
     */
    @Override
    public Long getTodayNewUsers()
    {
        return dashboardMapper.getTodayNewUsers();
    }

    /**
     * 获取今日新增视频数
     */
    @Override
    public Long getTodayNewVideos()
    {
        return dashboardMapper.getTodayNewVideos();
    }

    /**
     * 获取今日新增评论数
     */
    @Override
    public Long getTodayNewComments()
    {
        return dashboardMapper.getTodayNewComments();
    }

    /**
     * 获取今日新增点赞数
     */
    @Override
    public Long getTodayNewLikes()
    {
        return dashboardMapper.getTodayNewLikes();
    }

    /**
     * 获取用户增长趋势
     */
    @Override
    public List<Map<String, Object>> getUserTrend(int days)
    {
        return dashboardMapper.getUserTrend(days);
    }

    /**
     * 获取视频增长趋势
     */
    @Override
    public List<Map<String, Object>> getVideoTrend(int days)
    {
        return dashboardMapper.getVideoTrend(days);
    }

    /**
     * 获取视频分类统计
     */
    @Override
    public List<Map<String, Object>> getCategoryStats()
    {
        return dashboardMapper.getCategoryStats();
    }

    /**
     * 获取用户活跃度统计
     */
    @Override
    public List<Map<String, Object>> getUserActivity(int days)
    {
        return dashboardMapper.getUserActivity(days);
    }
}
